﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MeetingroomResourceControl.ascx.cs" Inherits="UCWebpart.MeetingroomResourceControl" %>

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
     AutoGenerateColumns="False" CellPadding="4" DataKeyNames="mtr_res_id"  ShowFooter="True"
     DataSourceID="EntityDataSource2" ForeColor="#333333" GridLines="None" OnPageIndexChanged="GridView1_PageIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="100%">
    <AlternatingRowStyle BackColor="White" />
    <Columns>

        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" Text="更新"></asp:LinkButton>
                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消"></asp:LinkButton>
            </EditItemTemplate>
            <FooterTemplate>
                <asp:Button ID="Insert" runat="server" CommandName="Insert" Height="22px" Text="Add" Width="63px" />
            </FooterTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit" Text="编辑"></asp:LinkButton>
                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete" Text="删除"></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="编号" SortExpression="mtr_res_id">
            <EditItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("mtr_res_id") %>'></asp:Label>
            </EditItemTemplate>
            <FooterTemplate>
                <asp:TextBox ID="mtr_res_id" runat="server" Width="38px"></asp:TextBox>
            </FooterTemplate>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("mtr_res_id") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="会议室编号" SortExpression="mtrId">
            <EditItemTemplate>
                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("mtrId") %> '></asp:TextBox>
            </EditItemTemplate>
            <FooterTemplate>
                <asp:DropDownList ID="mtrId_DDL" runat="server" DataSourceID="EntityDataSource11" DataTextField="mtrName" DataValueField="mtrId">
                </asp:DropDownList>
                <asp:EntityDataSource ID="EntityDataSource11" runat="server" ConnectionString="name=meetingroomManagementEntities" DefaultContainerName="meetingroomManagementEntities" EnableFlattening="False" EntitySetName="MTR_bas_Meetingroom" Select="it.[mtrName], it.[mtrId]">
                </asp:EntityDataSource>
            </FooterTemplate>
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Bind("mtrId") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="资源编号" SortExpression="resId">
            <EditItemTemplate>
                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("resId") %>'></asp:TextBox>
            </EditItemTemplate>
            <FooterTemplate>
                <asp:DropDownList ID="resId_DDL" runat="server" DataSourceID="EntityDataSource12" DataTextField="resName" DataValueField="resId">
                </asp:DropDownList>
                <asp:EntityDataSource ID="EntityDataSource12" runat="server" ConnectionString="name=meetingroomManagementEntities" DefaultContainerName="meetingroomManagementEntities" EnableFlattening="False" EntitySetName="MTR_bas_Resources" Select="it.[resName], it.[resId]">
                </asp:EntityDataSource>
            </FooterTemplate>
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%# Bind("resId") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <EditRowStyle BackColor="#2461BF" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#EFF3FB" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F5F7FB" />
    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
    <SortedDescendingCellStyle BackColor="#E9EBEF" />
    <SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
<asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=meetingroomManagementEntities" DefaultContainerName="meetingroomManagementEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="MTR_bas_MeetingroomResources">
</asp:EntityDataSource>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=meetingroomManagementEntities" DefaultContainerName="meetingroomManagementEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="MTR_bas_MeetingroomResources">
</asp:EntityDataSource>



<%--eval--%>